from selenium.webdriver.common.by import By

# 定义一个枚举类，枚举类里面放了我们的元素定位
class OrgPageElements():

    mail_list_url_path = "/wework_admin/frame#contacts"         # 通讯录页面url路径

    add_button = (By.CLASS_NAME, "member_colLeft_top_addBtn")   # +号按钮的元素定位
    add_org_button = (By.CLASS_NAME, "js_create_party")         # 添加部门按钮的元素定位
    name_input = (By.CSS_SELECTOR, "input[name=name]")      # 名称输入框的元素定位
    parent_org_box = (By.CSS_SELECTOR, "a[class$=js_toggle_party_list]")    # 所属部门选择框的元素定位
    parent_org_choise = (By.XPATH, "//div[starts-with(@class, 'qui_dropdownMenu')]//a[text()='{}']")  # 选择所属部门

    org_button = (By.XPATH, "//div[@class='member_colLeft']//a[text()='{}']")
    org_setting_button = (By.XPATH, "//div[@class='member_colLeft']//a[text()='{}']/span")    # 部门功能选择按钮
    update_org_name_button = (By.XPATH, "//div[@id='jstree-marker']/../ul//a[text()='修改名称']")   # 修改部门名称按钮


class TagPageElements():

    add_tag_button = (By.CLASS_NAME, "js_create_tag")
